package com.wy.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author 王昭贵
 * @since 2023-04-23
 */
@Data
@ApiModel(value = "Order对象", description = "订单表")
@TableName("`order`")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("流水号")
    private String code;

    @ApiModelProperty("支付方式")
    private int payType;

    @ApiModelProperty("用户id")
    private int customerId;

    @ApiModelProperty("支付金额")
    private BigDecimal payPrice;

    @ApiModelProperty("支付状态")
    private Integer payStatus;
    @ApiModelProperty("问诊记录id")
    private Integer diagnosisId;

    @TableField(exist = false)
    private String customerName;

    @TableField(exist = false)
    private List<OrderDetail> orderDetailList;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;


    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
